
document.writeln('<div id="hitimer_box">欢迎<span id="hitimer_from">外星球</span>的朋友，这是您第<span id="hitimer_count">N</span>次到访本站。</div><div id="hitimer_clock"></div>');
//AREA
var ht_jsload={head:document.getElementsByTagName("body")[0]||document.documentElement,Myload:function(B,A){this.done=false;B.onload=B.onreadystatechange=function(){if(!this.done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){this.done=true;A();B.onload=B.onreadystatechange=null;if(this.head&&B.parentNode){this.head.removeChild(B)}}}},getScript:function(A,C){var B=function(){};if(C!=undefined){B=C}var D=document.createElement("script");D.setAttribute("type","text/javascript");D.setAttribute("src",A);this.head.appendChild(D);this.Myload(D,B)}}
ht_jsload.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js', function () {
    if(remote_ip_info.city==remote_ip_info.province) remote_ip_info.province="";
    document.getElementById("hitimer_from").innerText=remote_ip_info.province+remote_ip_info.city
});
//COUNT
var ht_caution = false;
function ht_setCookie(name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "")
    if (!ht_caution || (name + "=" + escape(value)).length <= 4000) document.cookie = curCookie;
    else if (confirm("Cookie exceeds 4KB and will be cut!")) document.cookie = curCookie;
}
function ht_getCookie(name) {
    var prefix = name + "=";
    var cookieStartIndex = document.cookie.indexOf(prefix);
    if (cookieStartIndex == -1) return null;
    var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
    return (document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}
function ht_fixDate(date) {
    var base = new Date(0);
    var skew = base.getTime();
    if (skew > 0) date.setTime(date.getTime() - skew);
}
(function(){
	var now = new Date();
	ht_fixDate(now);
	now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
	var visits = ht_getCookie("ht_counter");
	if (!visits) visits = 1;
	else visits = parseInt(visits) + 1;
	ht_setCookie("ht_counter", visits, now, "/");
	document.getElementById("hitimer_count").innerText=visits;
})();
//TIME
function ht_time(){
    var today = new Date();
    var hrs = today.getHours();
    var min = today.getMinutes();
    var secs = today.getSeconds();
    var alsohrs = today.getHours();
    var dayNumber = today.getDate();
    var year = today.getFullYear();
    var ampm="", zero="0";
    var month = today.getMonth();
    var weekday = today.getDay();
    var wdn = ["SUN","MON","TUE","WED","THU","FRI","SAT"];
    // var wdn = ["日","一","二","三","四","五","六"];
    var mn = ["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];
    if (min<10) min=zero+min;
    if (secs<10) secs=zero+secs;
    if (hrs>12) hrs=eval(hrs - 12);
    if (hrs>=0 && hrs<1) hrs=12;
    if (alsohrs>=12 && alsohrs<24){
        ampm="P.M.";
    }else{
        ampm="A.M.";
    }
    tmp='<table class="datimer"><tr><td class="toptime" colspan="4">';
    tmp+=hrs+'<span id="blinker">:</span>'+min;
    tmp+='<span class="ampm"> '+ampm+'</span>';
    tmp+='<tr><td>Month<br><b>'+mn[month]+'</b></td>';
    tmp+='<td>Date<br><b>'+dayNumber+'</b></td>';
    tmp+='<td>Day<br><b>'+wdn[weekday]+'</b></td>';
    tmp+='<td>Year<br><b>'+year+'</b></td></tr></table>';
    document.getElementById("hitimer_clock").innerHTML=tmp;
    clocktime=setTimeout("ht_time()","1000");
}
function ht_blink(){
    var obj = document.getElementById("blinker");
    if (obj.style.visibility == "visible"){
            obj.style.visibility="hidden";
    }else{
        obj.style.visibility="visible";
    }
    eachsecond=setTimeout("ht_blink()","500");
}
ht_time();
ht_blink();